/**
 *
 */
package com.angel.io.validators.impl;

import com.angel.common.helpers.AnnotationHelper;
import com.angel.io.annotations.RowProcessorCommand;
import com.angel.io.exceptions.RowProcessorCommandValidatorException;
import com.angel.io.validators.RowProcessorCommandValidator;

/**
 * @author William
 *
 */
public class RowProcessorCommandAnnotationValidator implements RowProcessorCommandValidator{

	public void validate(Class<?> importRowCommandClass) throws RowProcessorCommandValidatorException {
		boolean hasAnnotation = AnnotationHelper.hasAnnotation(importRowCommandClass, RowProcessorCommand.class);
		if(!hasAnnotation){
			throw new RowProcessorCommandValidatorException("Class [" + importRowCommandClass.getCanonicalName() + "] must have RowProcessorCommand annotation.");
		}
	}


}
